﻿using System.Collections.Generic;
using Eagles.Base;
using Eagles.DomainService.Model.Sms;
using Eagles.DomainService.Model.User;

namespace Eagles.Interface.DataAccess.UserInfo
{
    public interface IUserInfoAccess : IInterfaceBase
    {
        int CreateUser(TbUserInfo userInfo);

        int EditUser(TbUserInfo userInfo);

        int EditUserPwd(TbUserInfo userInfo);

        int EditUserCity(TbUserInfo userInfo);

        int EditUserCollectLog(string type, TbUserCollectLog tbUserCollectLog);

        int EditUserNoticeIsRead(int newsId);

        TbUserInfo GetUserInfo(int userId);

        TbUserInfo GetLogin(int appId, string phone);

        TbUserInfo GetPhoneExists(string phone);

        int InsertToken(TbUserToken userToken);

        int UpdateToken(TbUserToken userToken);

        List<TbUserRelationship> GetRelationship(int userId, bool relationshipType);

        List<TbUserInfo> GetUserInfo(List<int> userIdList);

        List<TbUserNotice> GetUserNotice(int userId, int appId, int pageIndex = 1, int pageSize = 10);

        TbValidCode GetValidCode(TbValidCode validCode);

        int InsertSmsCode(TbValidCode validateCode);

        List<TbUserInfo> GetBranchUser(int appId, int branchId, string name);

        int GetActivityCount(int userId, int branchId);

        int GetTaskCount(int userId);
        
        List<TbUserInfo> GetOrgUser(int orgId);

        List<TbUserCollectLog> GeUserCollectLog(string collectType, int appId, int branchId, int userId);

        TbUserCollectLog GetUserCollectLog(string collectType, int newsId, int userId);
    }
}